package com.ruoyi.business.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.WxCarDeviceMapper;
import com.ruoyi.business.domain.WxCarDevice;
import com.ruoyi.business.service.IWxCarDeviceService;

/**
 * 车牌识别Service业务层处理
 * 
 * @author asher
 * @date 2022-05-23
 */
@Service
public class WxCarDeviceServiceImpl implements IWxCarDeviceService 
{
    @Autowired
    private WxCarDeviceMapper wxCarDeviceMapper;

    /**
     * 查询车牌识别
     * 
     * @param carDeviceId 车牌识别主键
     * @return 车牌识别
     */
    @Override
    public WxCarDevice selectWxCarDeviceByCarDeviceId(Long carDeviceId)
    {
        return wxCarDeviceMapper.selectWxCarDeviceByCarDeviceId(carDeviceId);
    }

    /**
     * 查询车牌识别列表
     * 
     * @param wxCarDevice 车牌识别
     * @return 车牌识别
     */
    @Override
    public List<WxCarDevice> selectWxCarDeviceList(WxCarDevice wxCarDevice)
    {
        return wxCarDeviceMapper.selectWxCarDeviceList(wxCarDevice);
    }

    /**
     * 新增车牌识别
     * 
     * @param wxCarDevice 车牌识别
     * @return 结果
     */
    @Override
    public int insertWxCarDevice(WxCarDevice wxCarDevice)
    {
        wxCarDevice.setCreateTime(DateUtils.getNowDate());
        return wxCarDeviceMapper.insertWxCarDevice(wxCarDevice);
    }

    /**
     * 修改车牌识别
     * 
     * @param wxCarDevice 车牌识别
     * @return 结果
     */
    @Override
    public int updateWxCarDevice(WxCarDevice wxCarDevice)
    {
        wxCarDevice.setUpdateTime(DateUtils.getNowDate());
        return wxCarDeviceMapper.updateWxCarDevice(wxCarDevice);
    }

    /**
     * 批量删除车牌识别
     * 
     * @param carDeviceIds 需要删除的车牌识别主键
     * @return 结果
     */
    @Override
    public int deleteWxCarDeviceByCarDeviceIds(Long[] carDeviceIds)
    {
        return wxCarDeviceMapper.deleteWxCarDeviceByCarDeviceIds(carDeviceIds);
    }

    /**
     * 删除车牌识别信息
     * 
     * @param carDeviceId 车牌识别主键
     * @return 结果
     */
    @Override
    public int deleteWxCarDeviceByCarDeviceId(Long carDeviceId)
    {
        return wxCarDeviceMapper.deleteWxCarDeviceByCarDeviceId(carDeviceId);
    }
}
